﻿
using System.ComponentModel;
using System.Data.Linq.Mapping;

namespace LuyenThiVer03.UserData
{
    [Table]
    public class DeThi:INotifyPropertyChanged
    {
        private int _deThiId;
        private int _monHocId;
        private int _maTranKienThucId;


        [Column(IsPrimaryKey = true, CanBeNull = false)]
        public int DeThiID
        {
            get { return _deThiId; } 
            set
            {
                _deThiId = value; 
                OnPropertyChanged("DeThiID");
            }
        }

        [Column(CanBeNull = true)]
        public int MonHocID
        {
            get { return _monHocId; } 
            set 
            {
                _monHocId = value; 
                OnPropertyChanged("MonHocID"); 
            }
        }

        [Column(CanBeNull = true)]
        public int MaTranKienThucID
        {
            get { return _maTranKienThucId; } 
            set
            {
                _maTranKienThucId = value; 
                OnPropertyChanged("MaTranKienThucID");
            }
        }

        [Column(CanBeNull = true)]
        public float GiaTien { get; set; }

        [Column(CanBeNull = true)]
        public bool IsDownload { get; set; }

        [Column(CanBeNull = true)]
        public bool IsDelete { get; set; }

        [Column(CanBeNull = true)]
        public float HighScore
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public float Score
        {
            get;
            set;
        }

        [Column(CanBeNull=true)]
        public string Time
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public int RightAnswer
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public int TotalAnswer
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public string CauHoiID_All
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public string UserAnswer_All
        {
            get;
            set;
        }

        [Column(CanBeNull = true)]
        public string MaDeThi
        {
            get;
            set;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
